package com.yami.shop.delivery.common.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yami.shop.bean.app.dto.DeliveryDto;
import com.yami.shop.bean.model.UserAddrOrder;
import com.yami.shop.delivery.common.param.OrderItemParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 *
 *
 * @author lhd
 * @date 2020-04-22 15:46:05
 */
@Data
@TableName("tz_delivery_order")
public class DeliveryOrder implements Serializable{
    private static final long serialVersionUID = 1L;

    @TableId
    @Schema(description = "订单物流包裹id", required = true)
    private Long orderDeliveryId;

    @Schema(description = "订单号", required = true)
    private String orderNumber;

    @Schema(description = "快递公司编号", required = true)
    private Long dvyId;

    @Schema(description = "收件人手机号")
    private String receiverMobile;

    @Schema(description = "快递单号", required = true)
    private String dvyFlowId;

    @Schema(description = "快递公司名称", required = true)
    @TableField(exist = false)
    private String dvyName;

    @Schema(description = "物流状态 1正常 -1删除", required = true)
    private Integer status;

    @Schema(description = "包裹商品总数", required = true)
    private Integer productNums;

    @Schema(description = "创建时间", required = true)
    private Date createTime;

    @Schema(description = "删除时间", required = true)
    private Date deleteTime;

    @Schema(description = "发货方式(1.快递 3.无需物流 4.同城配送)")
    private Integer deliveryType;

    @TableField(exist = false)
    @Schema(description = "包裹所有商品")
    private List<OrderItemParam> orderItems;

    @TableField(exist = false)
    @Schema(description = "物流信息")
    private DeliveryDto deliveryDto;

    @Schema(description = "订单号类型(0订单1兑换)")
    private String orderNumberType;
    @TableField(exist = false)
    private UserAddrOrder userAddrOrder;
    @TableField(exist = false)
    @Schema(description = "物流状态 :待发货 3:待收货 4:待评价 5:成功 6:失败")
    private String exchangeStatus;
    @TableField(exist = false)
    @Schema(description = "发货地址")
    private String fromAddress;
    @TableField(exist = false)
    @Schema(description = "发货省份")
    private String province;
    @TableField(exist = false)
    @Schema(description = "发货城市")
    private String city;
}
